import 'package:flutter/material.dart';

import '../../Pojo/AttentionPersion.dart';
import 'Widget/Itme.dart';

class AttentionIndex extends StatefulWidget {
  const AttentionIndex({Key? key}) : super(key: key);

  @override
  State<AttentionIndex> createState() => _AttentionIndexState();
}

class _AttentionIndexState extends State<AttentionIndex> {

  late List<AttentionPersion> APSList=[];

  late List<Widget> ItmeList=[];

  @override
  void initState() {
    // TODO: implement initState

    //数据获取
    APSList.add(AttentionPersion(
        "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fblog%2F202106%2F13%2F20210613235426_7a793.thumb.1000_0.jpeg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1675333525&t=163eb4997a91fede2a5fbcd907358648",
        "某某日报",
        "1"
    ));

    for(int i=0;i<APSList.length;i++){
      ItmeList.add(
        Itme(APS: APSList[i])
      );
    }

    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return SingleChildScrollView(
      child: Container(
        padding: EdgeInsets.all(8),
        child: Column(
          children: ItmeList,
        ),
      ),
    );
  }
}



